home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-PPC / AMIGAPPC.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-09-17  |  2.5 KB  |  90 lines

  1. /*
  2. ** asm-m68k/amigappc.h -- This header defines some values and pointers for
  3. **                        the Phase 5 PowerUp card.
  4. **
  5. ** Copyright 1997, 1998 by Phase5, Germany.
  6. **
  7. ** This file is subject to the terms and conditions of the GNU General Public
  8. ** License.  See the file COPYING in the main directory of this archive
  9. ** for more details.
  10. **
  11. ** Created: 7/22/97 by Jesper Skov
  12. */
  13.  
  14. #ifndef _M68K_AMIGAPPC_H
  15. #define _M68K_AMIGAPPC_H
  16.  
  17. #ifndef __ASSEMBLY__
  18.  
  19. #ifndef iobarrier_rw /* Don't include io.h - avoid circular dependency */
  20. #define iobarrier_rw() eieio()
  21. #endif
  22.  
  23. #define APUS_WRITE(_a_, _v_)                \
  24. do {                            \
  25.     (*((volatile unsigned char *)(_a_)) = (_v_));    \
  26.     iobarrier_rw ();                \
  27. } while (0)
  28.  
  29. #define APUS_READ(_a_, _v_)                 \
  30. do {                            \
  31.     (_v_) = (*((volatile unsigned char *)(_a_)));    \
  32.     iobarrier_rw ();                \
  33. } while (0)
  34. #endif /* ndef __ASSEMBLY__ */
  35.  
  36. /* Maybe add a [#ifdef WANT_ZTWOBASE] condition to amigahw.h? */
  37. #define zTwoBase (0x80000000)
  38.  
  39. /* At CYBERBASEp we find the following sum:
  40.  * -KERNELBASE+CyberStormMemoryBase
  41.  */
  42. #define CYBERBASEp (0xfff00000)
  43.  
  44. #define APUS_IPL_BASE       (zTwoBase + 0x00f60000)
  45. #define APUS_REG_RESET        (APUS_IPL_BASE + 0x00)
  46. #define APUS_REG_WAITSTATE        (APUS_IPL_BASE + 0x10)
  47. #define APUS_REG_SHADOW        (APUS_IPL_BASE + 0x18)
  48. #define APUS_REG_LOCK        (APUS_IPL_BASE + 0x20)
  49. #define APUS_REG_INT        (APUS_IPL_BASE + 0x28)
  50. #define APUS_IPL_EMU        (APUS_IPL_BASE + 0x30)
  51. #define APUS_INT_LVL        (APUS_IPL_BASE + 0x38)
  52.  
  53. #define REGSHADOW_SETRESET    (0x80)
  54. #define REGSHADOW_SELFRESET    (0x40)
  55.  
  56. #define REGLOCK_SETRESET    (0x80)
  57. #define REGLOCK_BLACKMAGICK1    (0x40)
  58. #define REGLOCK_BLACKMAGICK2    (0x20)
  59. #define REGLOCK_BLACKMAGICK3    (0x10)
  60.  
  61. #define REGWAITSTATE_SETRESET    (0x80)
  62. #define REGWAITSTATE_PPCW    (0x08)
  63. #define REGWAITSTATE_PPCR    (0x04)
  64.  
  65. #define REGRESET_SETRESET    (0x80)
  66. #define REGRESET_PPCRESET    (0x10)
  67. #define REGRESET_M68KRESET    (0x08)
  68. #define REGRESET_AMIGARESET    (0x04)
  69. #define REGRESET_AUXRESET    (0x02)
  70. #define REGRESET_SCSIRESET    (0x01)
  71.  
  72. #define REGINT_SETRESET        (0x80)
  73. #define REGINT_ENABLEIPL    (0x02)
  74. #define REGINT_INTMASTER    (0x01)
  75.  
  76. #define IPLEMU_SETRESET        (0x80)
  77. #define IPLEMU_DISABLEINT    (0x40)
  78. #define IPLEMU_IPL2        (0x20)
  79. #define IPLEMU_IPL1        (0x10)
  80. #define IPLEMU_IPL0        (0x08)
  81. #define IPLEMU_PPCIPL2        (0x04)
  82. #define IPLEMU_PPCIPL1        (0x02)
  83. #define IPLEMU_PPCIPL0        (0x01)
  84. #define IPLEMU_IPLMASK        (IPLEMU_PPCIPL2|IPLEMU_PPCIPL1|IPLEMU_PPCIPL0)
  85.  
  86. #define INTLVL_SETRESET         (0x80)
  87. #define INTLVL_MASK             (0x7f)
  88.  
  89. #endif /* _M68k_AMIGAPPC_H */
  90.